package omg.SongHandling.DataHandling;

import java.net.URI;

public class Song {

	private String title;
	private String artist;
	private String album;
	private String genre;
	private String year;
	private URI link;
	private Stream stream = null;
        private Parser parser = null;

	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getArtist() {
		return this.artist;
	}

	public void setArtist(String artist) {
		this.artist = artist;
	}

	public String getAlbum() {
		return this.album;
	}

	public void setAlbum(String album) {
		this.album = album;
	}

	public String getGenre() {
		return this.genre;
	}

	public void setGenre(String genre) {
		this.genre = genre;
	}

	public String getYear() {
		return this.year;
	}

	public void setYear(String year) {
		this.year = year;
	}

	public URI getLink() {
		return this.link;
	}

	public void setLink(URI link) {
		this.link = link;
	}

	public Stream getStream() {
		return this.stream;
	}

	public void setStream(Stream stream) {
		this.stream = stream;
	}

        public Parser getParser() {
		return this.parser;
	}

	public void setParser(Parser parser) {
		this.parser = parser;
	}

	/**
	 * 
	 * @return 
	 */
	public String[] getMetadata() {
            String[] metadata = {this.title, this.artist, this.album, this.genre, this.year};
            return metadata;
	}

	/**
         * @param metadata 
	 * @return 
	 */
	public void setMetadata(String[] metadata) {
            if (metadata.length > 0) this.title = metadata[0];
            if (metadata.length > 1) this.artist = metadata[1];
            if (metadata.length > 2) this.album= metadata[2];
            if (metadata.length > 3) this.genre = metadata[3];
            if (metadata.length > 4) this.year = metadata[4];
	}

}